{% extends "base.html" %}

{% block page_title %}
    {{ page_title }}
{% endblock %}

{% block content %}
    <h1>Entradas</h1>
    <ul>
        <li>
            <h2><a href="{% url process_url_slug entry.url_name %}">{{ entry.name }}</a></h2>
            <ul>
                <li>En: {% for name, url_name in entry.get_in_categories %}<a href="{% url process_url_slug url_name %}">{{ name }}</a> {% endfor %}</li>
                <li>{{ entry.created_at|date:"D, d F Y - H:m:s" }}</li>
                <li>{{ entry.content|safe }}</li>
            </ul>
        </li>
    </ul>
    <div>
        <a name="comentarios"></a>
        <h4>Comentarios:</h4>
        <ul>
        {% for comment in rs_comments %}
            <li><a name="coment-id"></a>
                <div>{{ comment.autor }} @ {{ comment.created_at|date:"D, d F Y - H:m:s" }}</div>
                <div>{{ comment.content|safe }}</div>
            </li>
        {% endfor %}
        </ul>
        <form method="post" action="{{ form_action_url }}">
            <fieldset>
                <legend>Dejá el tuyo</legend>
        {{ comment_form.as_ul }}
            </fieldset>
            <input type="submit" value="Enviar">
        </form>
    </div>
{% endblock %}
